/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package pe.edu.pucp.Reportes.Vista;

import java.awt.event.ActionListener;
import java.awt.event.ItemListener;
import java.awt.event.KeyListener;
import java.util.ArrayList;
import javax.swing.JFrame;
import javax.swing.table.DefaultTableModel;
import pe.edu.pucp.Modelo.Aeropuerto;
import pe.edu.pucp.Modelo.Permiso;
import pe.edu.pucp.Modelo.Vuelo;
import pe.edu.pucp.Util.Constante;

/**
 *
 * @author jorge
 */
public class ReporteSaturacionGUI extends javax.swing.JPanel {

    private JFrame padre;
    /**
     * Creates new form ReporteSaturacionGUI
     */
    public ReporteSaturacionGUI(JFrame p) {
        initComponents();
        padre = p;
        txtporcentaje.setTransferHandler(null);
        txtporcentajevuelo.setTransferHandler(null);
    }

    public JFrame getPadre() { return padre; }
    
    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
   

    public void setNombrePathArchivo(String path) {
        this.txtPath.setText(path);
    }
    
    public String  getFolderPath() {
        return txtPath.getText();
    }
    
    public int getAnhoInicio() { 
        if(cmbAnhoFIn.getSelectedIndex()==0)
            return 2012;
        else
           return cmbAnhoInicio.getSelectedIndex(); 
    }
    
    public int getAnhoFin() { 
        if(cmbAnhoFIn.getSelectedIndex()==0)
            return 2012;
        else
            return cmbAnhoFIn.getSelectedIndex();
    }
    
    public int getMesInicio() { 
        
        if(jmcMesInicio.getMonth()==0)
            return 1;
        else
            return jmcMesInicio.getMonth()+1;
    }   
    
    public int getMesFIn() { 
        
        if(jmcMesFIn.getMonth()==0)
            return 1;
        else
            return jmcMesFIn.getMonth()+1;        
    }   
       
    
    public double getPorcentaje() {
        if (this.txtporcentaje.getText().isEmpty())
            return -1;
        else return Double.parseDouble(this.txtporcentaje.getText());
    }
    
    public double getPorcentajeVuelo() {
        if (this.txtporcentajevuelo.getText().isEmpty())
            return -1;
        else return Double.parseDouble(this.txtporcentajevuelo.getText());
    }
    
    public void mostrarPermisos(ArrayList<Permiso> list){            
        if (!list.isEmpty()){                                
            btnBuscar.setEnabled(buscarPermiso(list,Constante.P_SIM_REP_BUSCAR)==1);
            btnGenerarPDF.setEnabled(buscarPermiso(list,Constante.P_SIM_REP_GENERAR)==1);
            btnSimular.setEnabled(buscarPermiso(list, Constante.P_SIM_SIM_SIMULAR)==1);
        }
    }    
  
    public int buscarPermiso(ArrayList<Permiso> list, int idel){
        int per=-1;
        for (Permiso opc : list){
            if (opc.getElemento().getIdelemento()==idel){ per =opc.getPermiso(); }
        }
        return per;
    }  
    
    public void addAbrifFileListener(ActionListener listener) {
        btnDireccionGuardar.addActionListener(listener);
    }
    
    public void addValidadorSoloNumero(KeyListener listener) {
        txtporcentaje.addKeyListener(listener);
        txtporcentajevuelo.addKeyListener(listener);
    }
        
    public void addLimpiarListener(ActionListener listener) { 
        btnLimpiar.addActionListener(listener); 
    }
        
    public void addSimulacionBtnListener(ActionListener listener) {
        btnSimular.addActionListener(listener);
    }
    
    public void addBuscarListener(ActionListener ml) { 
        btnBuscar.addActionListener(ml); 
    }
    
    public void addGenerarListener(ActionListener ml) { 
        btnGenerarPDF.addActionListener(ml); 
    }
    
    public void addDireccionGuardar(ActionListener ml){
        btnDireccionGuardar.addActionListener(ml);
    }
    
    public void addCambiarContinente(ItemListener ml){ /*cmbContinente.addItemListener(ml);*/ }     
    
    public void addCambiarPais(ItemListener ml){/*cmbPais.addItemListener(ml);*/ }  
    
    public void addCambiarCiudad(ItemListener ml){ /* cmbCiudad.addItemListener(ml);*/ }   
  
    
    public void llenaGrilla(ArrayList<Aeropuerto> lista){
        if(lista!=null){ 
            ((DefaultTableModel) this.tblResultados.getModel()).setRowCount(0);
            for (int f = 0; f<lista.size();f++){
                ((DefaultTableModel) tblResultados.getModel()).setRowCount(tblResultados.getRowCount()+1);               
                tblResultados.setValueAt(lista.get(f).getCiudad().getDescripcion(),f,0);
                tblResultados.setValueAt(lista.get(f).getDescripcion(),f,1);
                tblResultados.setValueAt(lista.get(f).getCappack(),f,2);
                tblResultados.setValueAt(lista.get(f).getCostpack()+" %",f,3);    
            }
            pnAeropuerto.setBorder(javax.swing.BorderFactory.createTitledBorder("Aeropuertos ("+lista.size() + ")"));
        } 
        else {
            pnAeropuerto.setBorder(javax.swing.BorderFactory.createTitledBorder("Aeropuertos"));
        }        
    }
    
    public void llenaGrillaVuelos(ArrayList<Vuelo> lista){        
        if(lista!=null){ 
            ((DefaultTableModel) this.tblSimulacionVuelos.getModel()).setRowCount(0);
            for (int f = 0; f<lista.size();f++){
                ((DefaultTableModel) tblSimulacionVuelos.getModel()).setRowCount(tblSimulacionVuelos.getRowCount()+1);               
                tblSimulacionVuelos.setValueAt(lista.get(f).getAeropuertoByIdorigen().getDescripcion(),f,0);
                tblSimulacionVuelos.setValueAt(lista.get(f).getAeropuertoByIddestino().getDescripcion(),f,1);
                tblSimulacionVuelos.setValueAt(Math.round(lista.get(f).getCosto()),f,2);
                tblSimulacionVuelos.setValueAt(Math.round(100*lista.get(f).getNumpack()/lista.get(f).getCosto())+" %",f,3);    
            }            
            pnVuelo.setBorder(javax.swing.BorderFactory.createTitledBorder("Vuelos ("+lista.size() + ")"));
        }
        else {
            pnVuelo.setBorder(javax.swing.BorderFactory.createTitledBorder("Vuelos"));
        }        
    }    
    
    
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        btnBuscar = new javax.swing.JButton();
        btnLimpiar = new javax.swing.JButton();
        btnGenerarPDF = new javax.swing.JButton();
        jLabel2 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        cmbAnhoFIn = new javax.swing.JComboBox();
        cmbAnhoInicio = new javax.swing.JComboBox();
        jLabel7 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        jmcMesInicio = new com.toedter.calendar.JMonthChooser();
        jmcMesFIn = new com.toedter.calendar.JMonthChooser();
        jLabel3 = new javax.swing.JLabel();
        txtporcentaje = new javax.swing.JTextField();
        jLabel5 = new javax.swing.JLabel();
        txtporcentajevuelo = new javax.swing.JTextField();
        pnAeropuerto = new javax.swing.JPanel();
        jScrollPane2 = new javax.swing.JScrollPane();
        tblResultados = new javax.swing.JTable();
        jPanel3 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        txtPath = new javax.swing.JTextField();
        btnDireccionGuardar = new javax.swing.JButton();
        btnSimular = new javax.swing.JButton();
        pnVuelo = new javax.swing.JPanel();
        jScrollPane3 = new javax.swing.JScrollPane();
        tblSimulacionVuelos = new javax.swing.JTable();

        setBorder(javax.swing.BorderFactory.createTitledBorder(""));

        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createTitledBorder(""), "Buscar"));

        btnBuscar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Recurso/checkmark.png"))); // NOI18N

        btnLimpiar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Recurso/refresh.png"))); // NOI18N

        btnGenerarPDF.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Recurso/address_book.png"))); // NOI18N

        jLabel2.setText("Año fin: ");

        jLabel4.setText("Año inicio: ");

        cmbAnhoFIn.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "2012", "2013" }));

        cmbAnhoInicio.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "2012", "2013" }));

        jLabel7.setText("Mes Fin");

        jLabel8.setText("Mes Inicio:");

        jmcMesInicio.setDayChooser(null);
        jmcMesInicio.setYearChooser(null);

        jLabel3.setText("Aeropuerto:");

        txtporcentaje.setText("0.1");

        jLabel5.setText("Vuelo:");

        txtporcentajevuelo.setText("0.1");

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 82, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(40, 40, 40)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(cmbAnhoFIn, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(cmbAnhoInicio, javax.swing.GroupLayout.PREFERRED_SIZE, 92, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jLabel3)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(txtporcentaje, javax.swing.GroupLayout.PREFERRED_SIZE, 92, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel7)
                    .addComponent(jLabel8)
                    .addComponent(jLabel5))
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jmcMesFIn, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(txtporcentajevuelo, javax.swing.GroupLayout.PREFERRED_SIZE, 92, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(116, 116, 116)
                                .addComponent(btnBuscar, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(btnLimpiar, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(btnGenerarPDF, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jmcMesInicio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnBuscar, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnLimpiar, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnGenerarPDF, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(5, 5, 5))
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(jLabel4)
                    .addComponent(cmbAnhoInicio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel8)
                    .addComponent(jmcMesInicio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(jLabel2)
                    .addComponent(cmbAnhoFIn, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel7)
                    .addComponent(jmcMesFIn, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtporcentajevuelo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel3)
                        .addComponent(txtporcentaje, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel5)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pnAeropuerto.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createTitledBorder(""), "Aeropuertos"));

        tblResultados.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "CIUDAD", "AEROPUERTO", "CAPACIDAD", "SATURACIÓN (%)"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false, false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane2.setViewportView(tblResultados);
        tblResultados.getColumnModel().getColumn(0).setResizable(false);
        tblResultados.getColumnModel().getColumn(1).setResizable(false);
        tblResultados.getColumnModel().getColumn(2).setResizable(false);
        tblResultados.getColumnModel().getColumn(3).setResizable(false);

        javax.swing.GroupLayout pnAeropuertoLayout = new javax.swing.GroupLayout(pnAeropuerto);
        pnAeropuerto.setLayout(pnAeropuertoLayout);
        pnAeropuertoLayout.setHorizontalGroup(
            pnAeropuertoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnAeropuertoLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane2)
                .addContainerGap())
        );
        pnAeropuertoLayout.setVerticalGroup(
            pnAeropuertoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnAeropuertoLayout.createSequentialGroup()
                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 143, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 0, Short.MAX_VALUE))
        );

        jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder("Archivos"));

        jLabel1.setText("Archivo:");

        txtPath.setEditable(false);
        txtPath.setText("/home");

        btnDireccionGuardar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Recurso/folder.png"))); // NOI18N

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 92, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(28, 28, 28)
                .addComponent(txtPath, javax.swing.GroupLayout.PREFERRED_SIZE, 454, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 78, Short.MAX_VALUE)
                .addComponent(btnDireccionGuardar)
                .addContainerGap())
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGap(6, 6, 6)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtPath, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel1)))
                    .addComponent(btnDireccionGuardar))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        btnSimular.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Recurso/chart.png"))); // NOI18N
        btnSimular.setToolTipText("Iniciar Simulación");

        pnVuelo.setBorder(javax.swing.BorderFactory.createTitledBorder("Vuelos"));

        tblSimulacionVuelos.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "ORIGEN", "DESTINO", "VUELO", "SATURACION (%)"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false, true, true
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane3.setViewportView(tblSimulacionVuelos);
        tblSimulacionVuelos.getColumnModel().getColumn(0).setResizable(false);
        tblSimulacionVuelos.getColumnModel().getColumn(1).setResizable(false);
        tblSimulacionVuelos.getColumnModel().getColumn(2).setResizable(false);
        tblSimulacionVuelos.getColumnModel().getColumn(3).setResizable(false);

        javax.swing.GroupLayout pnVueloLayout = new javax.swing.GroupLayout(pnVuelo);
        pnVuelo.setLayout(pnVueloLayout);
        pnVueloLayout.setHorizontalGroup(
            pnVueloLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnVueloLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane3)
                .addContainerGap())
        );
        pnVueloLayout.setVerticalGroup(
            pnVueloLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnVueloLayout.createSequentialGroup()
                .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 146, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 10, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(pnVuelo, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(pnAeropuerto, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addComponent(btnSimular)))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(pnAeropuerto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(pnVuelo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(51, 51, 51)
                .addComponent(btnSimular)
                .addContainerGap(20, Short.MAX_VALUE))
        );
    }// </editor-fold>//GEN-END:initComponents
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnBuscar;
    private javax.swing.JButton btnDireccionGuardar;
    private javax.swing.JButton btnGenerarPDF;
    private javax.swing.JButton btnLimpiar;
    private javax.swing.JButton btnSimular;
    private javax.swing.JComboBox cmbAnhoFIn;
    private javax.swing.JComboBox cmbAnhoInicio;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private com.toedter.calendar.JMonthChooser jmcMesFIn;
    private com.toedter.calendar.JMonthChooser jmcMesInicio;
    private javax.swing.JPanel pnAeropuerto;
    private javax.swing.JPanel pnVuelo;
    private javax.swing.JTable tblResultados;
    private javax.swing.JTable tblSimulacionVuelos;
    private javax.swing.JTextField txtPath;
    private javax.swing.JTextField txtporcentaje;
    private javax.swing.JTextField txtporcentajevuelo;
    // End of variables declaration//GEN-END:variables
}
